# goods = ["苹果","香蕉","桃","梨","菠萝"]
# print(goods[0:2])
# print(goods[3:])
# print(goods[2:3])
#
# lst = [1,4,1,6,2,7,2,6]
# print(set(lst))
#
# lst = [1,2,3,4,2,5,6,2]
# a=0
# for i in range (len(lst)):
#     if lst[i] == 2 :
#         a+=1
#         print("所索引值为：{}".format(i))
# print("列表中2的个数为：{}".format(a))

a = {
    "001":{"name":"陈可立","age":20,"address":"达州"},
    "002":{"name":"邓时友","age":20,"address":"南充"},
    "003":{"name":"袁毅康","age":19,"address":"河南"},
    "004":{"name":"刘小聪","age":20,"address":"绵阳"}
}
#1.取出003对应的所有信息
#2.给所有南充人 加10000块住房补贴
#3.取出年龄最小的那组信息

print(a["003"])
min=100
b=""
for k,v in a.items():
        if v["address"] == "南充":
          print(k,v)
for k,v in a.items():
    if v["age"] < min :
        min = v["age"]
        b=k
print(a[b])
print(min)
